<?php
		require("../dbconnect.php");
		require("../function.php");

		$sub_cat=$_GET["subcatid"];
		
		
		$getProd=mysql_query("select * from os_products where sub_cat_id='$sub_cat'");
		
		
		$content= "
			<select name='product' class=text onchange='getStock(this.value)'>
				<option value=''>please select</option>
			";
			if(mysql_num_rows($getProd)>0)
			{
				while($p=mysql_fetch_array($getProd,MYSQL_ASSOC))
				{
					$content.="<option value='".$p['id']."'>".$p['product_name_eng']."</option>";
				}
			
				$content.="</select>";
			}
		echo iconv('GBK', 'utf-8', $content);
		
?>